<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>Examples</title>
	<meta name="description" content="">
	<meta name="keywords" content="">
	<link href="" rel="stylesheet">
	<script>
		var str = "abc dbc ebc gbc 4bc";
		var re = /[a-z]bc/g;  //[ ] 表示范围
		var re2 = /[^a-z]bc/g;  //[^ ] 表示 除了这个范围
		// [^a-z0-9]. 除了字母数字
		alert(str.match(re));
		alert(str.match(re2));
	</script>
</head>
<body>
    
</body>
</html>